﻿@model IEnumerable<User>
@{
    SortBy_User sortBy = ViewData.Get<SortBy_User>("SortBy", SortBy_User.PreWeekHitTimes);
}

<p class="tbg2">
    @Html.Link("更多", SiteUrls.Instance().FindUserRanking(sortBy), "更多", new { @class = "fr" })
    <span class="t1 fl">
        @switch (sortBy)
        {
            case SortBy_User.FollowerCount:
                @:粉丝最多用户
                        break;
            case SortBy_User.ReputationPoints:
            @:威望最高用户
                        break;
            case SortBy_User.PreWeekReputationPoints:
            @:近期威望最高用户
                        break;
            case SortBy_User.HitTimes:
            @:人气最高用户
                        break;
            case SortBy_User.TradePoints:
            @:金币最多用户
                        break;
            case SortBy_User.PreWeekHitTimes:
            @:近期人气用户
                break;
            case SortBy_User.Rank:
                break;
            case SortBy_User.DateCreated:
            @:最新加入
                break;
            default:
                break;
        }
    </span>
</p>  <!--标题-->
<div class="ilist1">
    <ul id="weekHotList">
        @foreach (var user in Model)
        {
            <li class="tn-avatar-item" style="float:left; ">
                <a data-user-card-url="/channel/_usercard.aspx?userid=@user.UserId" href="/channel/zmemberdetail.aspx?spacekey=@user.UserName" outerclass="tn-user-card" plugin="tipsyHoverCard" target="_blank" original-title=""><img alt="站点管理员" src="/Uploads/Avatars/@(user.Avatar)_big.jpg" onerror="this.src = '/Uploads/Avatars/avatar_default_big.jpg'" width="160px" height="190px;"></a>
                <div class="tn-avatar-item-div" >
                    <p>
                        ID:@user.UserId.ToString().Substring(user.UserId.ToString().Length - 9)  @user.Profile.Gender.EnumMetadataDisplay()
                    </p>
                    <p @*class="f12 f-c1 mt-5"*@>@(user.CalculateAgeCorrect(user.Profile.Birthday, DateTime.Now))岁 &nbsp;&nbsp;@(string.IsNullOrEmpty(user.Basecase.Height) ? "未填写" : user.Basecase.Height + "cm") &nbsp;&nbsp;  </p>
                    <p>@(string.IsNullOrEmpty(user.Profile.NowAreaCode) ? "未填写" : user.Profile.NowAreaCode)</p>
                    <p> @(user.Profile.EducationExperience == null || user.Profile.EducationExperience.Count() <= 0 ? "未填写" : user.Profile.EducationExperience.First().AsEditModel().Degree.EnumMetadataDisplay()) &nbsp;&nbsp; @(user.Basecase == null || string.IsNullOrEmpty(user.Basecase.Salary) ? "未填写" : user.Basecase.Salary)</p>
                </div> </li>
                    
        }
    </ul>
</div>
@*<div class="tn-box tn-widget tn-widget-content tn-corner-all">
        <div class="tn-box-header tn-widget-header tn-corner-top tn-border-bottom">
            <div class="tn-option">@Html.Link("更多", SiteUrls.Instance().FindUserRanking(sortBy), "更多")</div>
            <h3 class="tn-helper-reset">
                @switch (sortBy)
                {
                    case SortBy_User.FollowerCount:
                    @:粉丝最多用户
                        break;
                    case SortBy_User.ReputationPoints:
                    @:威望最高用户
                        break;
                    case SortBy_User.PreWeekReputationPoints:
                    @:近期威望最高用户
                        break;
                    case SortBy_User.HitTimes:
                    @:人气最高用户
                        break;
                    case SortBy_User.TradePoints:
                    @:金币最多用户
                        break;
                    case SortBy_User.PreWeekHitTimes:
                    @:近期人气用户
                break;
                    case SortBy_User.Rank:
                break;
                    case SortBy_User.DateCreated:
                    @:最新加入
                break;
                    default:
                break;
                }
            </h3>
        </div>
        <div class="tn-box-content tn-widget-content tn-corner-bottom">
            <ul class="tn-avatar-list tnc-person-flow tn-helper-clearfix">
                @foreach (var user in Model)
                {
                    <li class="tn-avatar-item">@Html.ShowUserAvatar(user.UserId, AvatarSizeType.Small, true)
                        @Html.Link(user.DisplayName, SiteUrls.Instance().SpaceHome(user.UserId), user.DisplayName, new { @class = "tn-user-name" }, HyperLinkTarget._blank)
                    </li>
                }
            </ul>
        </div>
    </div>*@

